package study;

import cn.hutool.http.webservice.SoapClient;

import java.util.HashMap;
import java.util.Map;

public class WsdlTest {
    public static void main(String[] args) {
        String wsdlUrl="http://www.webxml.com.cn/webservices/DomesticAirline.asmx?wsdl";
        Map<String,Object> map = new HashMap<>();
        map.put("startCity","上海");
        map.put("lastCity","北京");
        map.put("theDate","2022-08-20");
        SoapClient soapClient = SoapClient.create(wsdlUrl)
                .setMethod("getDomesticAirlinesTime","http://WebXml.com.cn/")
                .setParams(map)
                .setConnectionTimeout(15000)
                .setReadTimeout(15000)
                .timeout(15000);
        String res = soapClient.send(true);
        System.out.println(res);
    }
}
